import { NewDraftingDocModal } from '@app-base/environments/nextcad/widgets/LeftPanel/modals/NewDraftingDocModal';
import { useState } from 'react';
function GenerateDrafting({ onClose }) {
  const [draftingDocModalOpen, setDraftingDocModalOpen] = useState(true);
  return (
    <NewDraftingDocModal
      open={draftingDocModalOpen}
      onClose={() => {
        onClose();
        setDraftingDocModalOpen(false);
      }}
    />
  );
}

export const cmdGenerateDrafting = {
  id: 'CmdGenerateDrafting',
  label: 'command.generate-drafting',
  icon: 'commands/feature/generate-drafting',
  create: (label: string, onClose: () => void) => (
    <GenerateDrafting onClose={onClose} />
  ),
};
